using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using BussinessLogicLayer;

namespace QLThongTinGiaiDauBongDa.Presentation.frmDoiBong
{
    public partial class frmQLDoiBong : DevComponents.DotNetBar.Metro.MetroForm
    {
        public frmQLDoiBong()
        {
            InitializeComponent();
        }

        private void btnDong_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnThemDB_Click(object sender, EventArgs e)
        {
            frmThemCapNhatDoiBong frmTCNDB = new frmThemCapNhatDoiBong();
            frmTCNDB.Show();
        }

        private void btnXemChiTietDB_Click(object sender, EventArgs e)
        {
            frmChiTietDoiBong frmCTDB = new frmChiTietDoiBong();
            frmCTDB.Show();
        }

        private void frmQLDoiBong_Load(object sender, EventArgs e)
        {
            cbbGiaiDau.DataSource = GiaiDauBLL.LayGiaiDau();
            cbbGiaiDau.DisplayMember = "TenGiaiDau";
            cbbGiaiDau.ValueMember = "MaGiaiDau";
            dgvDoiBong.DataSource = DoiBongBLL.LayDBChodgv(int.Parse(cbbGiaiDau.SelectedValue.ToString()));
            dgvDoiBong.Columns["MaGiaiDau"].Visible = false;
            dgvDoiBong.Columns["GiaiDau"].Visible = false;
            dgvDoiBong.Columns["Khoa"].Visible = false;
        }
    }
}